<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/fuman/js/oversea.js"></script>
<title>发货计划</title>
<body class="withvernav">
<div class="bodywrapper"> {{include file='/public/leftmenu.tpl'}}
  <div class="centercontent">
    <div class="pageheader notab">
      <h1 class="pagetitle">封装发货</h1>
      <span class="pagedesc"></span>
      
    </div>
    <!--pageheader-->
    
   <div id="contentwrapper" class="contentwrapper">
        	<div id="basicform" class="subcontent">
        <form class="stdform stdform2"  id="theFrom" method="post" action="/oversea/savecompare">
         
          <div class="contenttitle2">
            <h3>基本信息</h3>
          </div>
           <div class="x_content" style="overflow-x:auto;">
             <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
          
            <thead>
              <tr>
                <th class="head1">运输计划编号</th>
                
                <th class="head1">运输方式</th>
                <th class="head1">店铺</th>
                <th class="head1">始发地</th>
                <th class="head1">目的地</th>
                
               
              </tr>
            </thead>
            <tbody>
            
           
            <tr>
              <td class="head1">{{$detail.groupid}}</td>
              <td class="head0">{{$detail.transportmode}}</td>
              <td>{{$detail.shopname}}</td>
              <td class="center">{{$detail.startingplace}}</td>
              <td class="center">{{$detail.destination}}</td>
            </tr>
              </tbody>
            
          </table>
         </div>
         
         
         
        
          <div class="contenttitle2">
            <h3>合计信息</h3>
          </div>
          <div class="bq2 currentstatus marginbottom0">
                      SKU数 :{{$detail.skunum}}个&nbsp;&nbsp;&nbsp;&nbsp;数量: {{$detail.totalnum}}&nbsp;&nbsp;&nbsp;&nbsp; 金额：{{$detail.totalamount}}<br>
                    
                    </div>
           {{if $showdetail==0}}
          <div class="contenttitle2">
            <h3>计划发货清单</h3>
          </div>
           <div class="x_content" style="overflow-x:auto;">
          <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
            <colgroup>
            <col class="con1" />
            <col class="con0" />
            <col class="con1" />
            <col class="con0" />
            <col class="con1" />
            <col class="con0" />
            <col class="con1" />
            </colgroup>
            <thead>
              <tr>
                <th class="head0">SKU</th>
                <th class="head1">商品名称</th>
                <th class="head0">重量 KG</th>
                <th class="head1">体积 CBM</th>
                <th class="head0">长 CM</th>
                <th class="head0">宽 CM</th>
                <th class="head0">高 CM</th>
                <th class="head0">成本价</th>
                <th class="head0">发货数</th>
                <th class="head0">价格</th>
              </tr>
            </thead>
            <tbody>
            
            {{foreach from=$goodsdata item=li key=key}}
            <tr {{if $li.st==1}}bgcolor="#FFD2D2" title="带商标商品"{{/if}}>
              <td>{{$li.sku}}<input type="hidden" name="goodslist[sku][]" value="{{$li.sku}}"></td>
              <td>{{$li.name}}</td>
              <td>{{$li.weight}}</td>
              <td class="center">{{$li.volumenum}}</td>
              <td class="center">{{$li.lengthnum}}</td>
              <td class="center">{{$li.widthnum}}</td>
              <td class="center">{{$li.heightnum}}</td>
              <td class="center">{{$li.costprice}}<input type="hidden" name="goodslist[costprice][]" value="{{$li.costprice}}"></td>
              <td class="center">{{$li.sendnums}}<input type="hidden" name="goodslist[sendnums][]" value="{{$li.sendnums}}"></td>
              <td class="center">{{$li.totalprice}}</td>
            </tr>
            {{/foreach}}
              </tbody>
            
           
          </table>
          </div>
          {{/if}}
          {{if $boxlistcount >0}}
          <div class="contenttitle2">
            <h3>已封箱列表</h3>
          </div>
          
          
           <div class="x_content" style="overflow-x:auto;">
          <table cellpadding="0" cellspacing="0" border="0" class="stdtable" id="addTable" >
            <colgroup>
            <col class="con1" />
            <col class="con0" />
            <col class="con1" />
            <col class="con0" />
            <col class="con1" />
            <col class="con0" />
            <col class="con1" />
            </colgroup>
            <thead>
              <tr>
                <th class="head0">箱号</th>
                <th class="head1">装箱日期</th>
                <th class="head0">装箱人</th>
                <th class="head1">规格</th>
                <th class="head1">总数量</th>
                <th class="head1">成本</th>
                <th class="head1">重量</th>
                <th class="head1">编辑</th>
              </tr>
            </thead>
            <tbody>
            
            {{foreach from=$boxlist item=li key=key}}
            <tr>
              <td>{{$li.boxnumber}}
               </td>
              <td>{{$li.createtime}}</td>
              <td>{{$li.createname}}</td>
              <td class="center">{{$li.specifications}} </td>
            <td class="center">{{$li.quantity}}</td>
            <td class="center">{{$li.allprice}}</td>
              <td class="center">{{$li.weight}}</td>
               <td class="head1"><a href="/oversea/showcompare/{{$li.id}}">查看</a> 
               
               {{if $detail.status !=4}}｜ <a href="/oversea/undo/{{$li.id}}/{{$detail.id}}">撤销</a>
               
               {{/if}}
               </td>
            </tr>
            {{/foreach}}
              </tbody>
             <tbody id="addrowlist"></tbody>
            <tfoot>
            </tfoot>
          </table>
          </div>
          {{/if}}
          
          {{if $showdetail==1}}
          <div class="contenttitle2">
            <h3>封装发货</h3>
          </div> <img src="/fuman/images/addfolder.png" title="凑箱子数" onClick="showaddRow()">
          <span id="showrow" style="display:none"><input type="text" name="skuname" class="width100" placeholder="请输入SKU" id="skuname" onBlur="addRow({{$detail.id}})"></span>
          <table cellpadding="0" cellspacing="0" border="0" class="stdtable" id="addTable" >
            <colgroup>
            <col class="con1" />
            <col class="con0" />
            <col class="con1" />
            <col class="con0" />
            <col class="con1" />
            <col class="con0" />
            <col class="con1" />
            </colgroup>
             <div class="x_content" style="overflow-x:auto;">
            <thead>
              <tr>
                <th class="head0">SKU</th>
                 <th class="head1">商品名</th>
                <th class="head1">姓名</th>
                <th class="head0">需要数</th>
                <th class="head1">计划发货数</th>
                <th class="head1">发货数</th>
             
              </tr>
            </thead>
            <tbody>
            
            {{foreach from=$detaillist item=li key=key}}
            {{if $li.lastnowbuynum>0}}
            <tr {{if $li.st==1}}bgcolor="#FFD2D2" title="带商标商品"{{/if}}>
              <td>{{$li.sku}}
                <input type='hidden' name='id[]' value={{$li.pid}}>
              <input type='hidden' name='costprice[]' value={{$li.costprice}}></td>
              <td>{{$li.name}}</td>
                <td>{{$li.createUser}}</td>
              <td>{{$li.skunum}}</td>
              <td class="center">{{$li.sendnums}}</td>
              <td class="center"><input type='hidden' name='oldnum[]' id='oldnum{{$li.pid}}' value={{$li.sendnums}}>
                <input type="text" name="nowbuynum[]" class="width100" onBlur="altshone(this,'{{$li.pid}}',{{$li.lastnowbuynum}})" >
                <={{$li.lastnowbuynum}} <span id="showerr{{$li.pid}}"></span></td>
            
            </tr>
            {{/if}}
            {{/foreach}}
              </tbody>
            <tbody id="addrowlist"></tbody>
            <tfoot>
            </tfoot>
          </table>
          </div>
          <br>
           <p>
            <label>箱号</label>
            <span class="field"><span id="groupid">{{$boxnumber}}-</span><input type="hidden" name="boxnumber" value="{{$boxnumber}}"><input type='text' style="width:30px;" name='box' id='box' onBlur="getbox()"><span id="boxerr"></span></span>
            
          </p>
          <p>
            <label>纸箱规格</label>
            <span class="field"><select class="selection" id="cartons" name="cartons">
                  
						     	 {{foreach from=$cartons item=li key=s}}
					    			
                  <option value="{{$li}}">{{$li}}</option>
                  
					  	     	{{/foreach}}
					    			
					  	     	
							
                </select></span>
          </p>
           <p>
            <label>重量</label>
            <span class="field"><input type="text" name="weight" id="weight" class="width100" value="{{$weight}}"> KG<span id="weighterr"></span></span>
          </p>
         
          <p class="stdformbutton"> <span >
          <input type="hidden" name="groupid" value="{{$detail.groupid}}">
          <input type="hidden" name="transportationplanning_id" value="{{$detail.id}}">
          <button type="button" class="submit radius2" id="btn" onClick="savecompare()" >保存装箱</button>
            </span> </p>
             {{/if}}
        </form>
        <br />
        
        
      </div>
      <!--subcontent--> 
      
      <!--subcontent--> 
      
    </div>
    <!--contentwrapper--> 
    
  </div>
  <!-- centercontent --> 
  
</div>
<!--bodywrapper-->

</body>
</html>